x86: stub domains and page ownership for mapping in dom0
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 18 Mar 2008 16:15:24 +0000 (16:15 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 18 Mar 2008 16:15:24 +0000 (16:15 +0000)
commit2e21994a8294399992f90618e0ea130408490d3f
tree8314695390da4110a320b1e45fc16a94a4f9c3f6
parentd9f7477cfab7f0574ff23079bcf43a08a8ada9d4
x86: stub domains and page ownership for mapping in dom0

In the case of an ioemu stubdomain with SDL or vnc server running in
dom0, we want to have the stubdomain expose the HVM guest's video RAM
through PVFB.

However, to map the pages from dom0, xenfb uses xc_map_foreign_pages
with the stubdomain ID as domid (since that is what is advertised in
the PVFB protocol, and needed for other parts of the protocol), and
thus get_page_from_l1e() complains because the stubdomain is not the
owner of the pages.  In such case, this patch checks that the
stubdomain has privileges on the actual owner of the pages, and then
accept the mapping.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
xen/arch/x86/mm.c